Computer programs are groups of instructions that describe actions to be performed by a computer or other processor-based device. When a computer program is loaded and executed on computer hardware, the computer will behave in a predetermined manner by following the instructions of the computer program. Accordingly, the computer becomes a specialized machine that performs the tasks prescribed by the instructions.
A programmer using one or more programming languages creates the instructions comprising a computer program. Typically, source code is specified or edited by a programmer manually and/or with help of an integrated development environment (IDE). Subsequently, the source code can be compiled or otherwise transformed by another program into computer instructions executable by a computer or like device.
By way of example, a programmer may choose to implemented code utilizing an object-oriented programming language (e.g., Visual Basic, C#, Java . . . ). In accordance with such a paradigm, programmers will create a number of classes identifying properties and characteristics of an abstract thing as well as methods describing class behavior or abilities. Specific programmatic logic can then be specified as interactions between instances of classes or objects, among other things. Subsequently, executable code for a particular machine can be produced by an associated compiler. Alternatively, code can be transformed into intermediate code (e.g., CIL (Common Intermediate Language), Java Byte Codes . . . ) for a target virtual machine to facilitate execution on multiple computer platforms via further compilation or interpretation of the intermediate code.
Conventionally, programming languages are either statically typed or dynamically typed. Types provide constraints on the interpretation of data in accordance with a language type system. Accordingly, types can be utilized to detect programming errors via a type checking. In other words, a degree of program safety can be obtained by detecting meaningless or likely invalid code as a function of data types. This can be accomplished either statically or dynamically. A statically typed language enables a program to be type checked at compile time. Accordingly, all types are known at compile time, for example by explicit specification or type inference. Dynamically typed languages differ in that they are type checked at runtime. As a consequence, types need not be explicitly specified prior to use, rather they are determined during execution.
When selecting a language, programmers need to consider tradeoffs between static and dynamic typing. In particular, static typing is beneficial in that errors can be detected prior to execution and programs can execute very efficiently. Further, design time experience can be improved since assistance such as automatic fills and suggestions can be provided based on types. However, dynamically typed languages allow more programmatic flexibility than static typed languages while still providing a degree of type safety via runtime checking. Furthermore, dynamically typed languages are easier to use, as programmers need not be concerned with type specification.